<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1"><title id="cx154761">DROP INDEX</title><body><p id="sql_command_desc">Removes an index.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] <varname>name</varname> [, ...] [ CASCADE | RESTRICT ]</codeblock></section><section id="section3"><title>Description</title><p><codeph>DROP INDEX</codeph> drops an existing index from the database
system. To run this command you must be the owner of the index. </p></section><section id="section4"><title>Parameters</title>
      <parml>
        <plentry>
          <pt>CONCURRENTLY</pt>
          <pd>Drop the index without locking out concurrent selects, inserts, updates, and deletes
            on the index's table. A normal <codeph>DROP INDEX</codeph> acquires an exclusive lock on
            the table, blocking other accesses until the index drop can be completed. With this
            option, the command instead waits until conflicting transactions have completed. </pd>
          <pd>There are several caveats to be aware of when using this option. Only one index name
            can be specified, and the <codeph>CASCADE</codeph> option is not supported. (Thus, an
            index that supports a <codeph>UNIQUE</codeph> or <codeph>PRIMARY KEY</codeph> constraint
            cannot be dropped this way.) Also, regular <codeph>DROP INDEX</codeph> commands can be
            performed within a transaction block, but <codeph>DROP INDEX CONCURRENTLY</codeph>
            cannot.</pd>
        </plentry>
      </parml><parml><plentry><pt>IF EXISTS</pt><pd>Do not throw an error if the index does not exist. A notice is issued
in this case. </pd></plentry><plentry><pt><varname>name</varname></pt><pd>The name (optionally schema-qualified) of an existing index.</pd></plentry><plentry><pt>CASCADE</pt><pd>Automatically drop objects that depend on the index. </pd></plentry><plentry><pt>RESTRICT</pt><pd>Refuse to drop the index if any objects depend on it. This is the
default. </pd></plentry></parml></section><section id="section5"><title>Examples</title><p>Remove the index <codeph>title_idx</codeph>: </p><codeblock>DROP INDEX title_idx;</codeblock></section><section id="section6"><title>Compatibility</title><p><codeph>DROP INDEX</codeph> is a Greenplum Database language extension.
There are no provisions for indexes in the SQL standard. </p></section><section id="section7"><title>See Also</title><p><codeph><xref href="ALTER_INDEX.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="CREATE_INDEX.xml#topic1" type="topic" format="dita"/></codeph>, <codeph><xref
            href="./REINDEX.xml#topic1" type="topic" format="dita"/></codeph></p></section></body></topic>
